package com.zzedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzedu.domain.ZzThesaurusWordsTagRelated;
import com.zzedu.dto.ZzThesaurusWordsTagRelatedDTO;
import com.zzedu.mapper.ZzThesaurusWordsTagRelatedMapper;
import com.zzedu.service.IZzThesaurusWordsTagRelatedService;
import org.springframework.stereotype.Service;
/**
 * (教育-词库)单词标签关系Service业务层处理
 * 
 * @author Mr.Wang
 * @date 2025-01-30
 */
@Service
public class ZzThesaurusWordsTagRelatedServiceImpl extends ServiceImpl<ZzThesaurusWordsTagRelatedMapper,ZzThesaurusWordsTagRelated> implements IZzThesaurusWordsTagRelatedService
{

    @Override
    public LambdaQueryWrapper<ZzThesaurusWordsTagRelated> buildQuery(ZzThesaurusWordsTagRelatedDTO zzThesaurusWordsTagRelated) {
        LambdaQueryWrapper<ZzThesaurusWordsTagRelated> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(null!=zzThesaurusWordsTagRelated.getWordId(), ZzThesaurusWordsTagRelated::getWordId, zzThesaurusWordsTagRelated.getWordId());
        lambdaQueryWrapper.eq(null!=zzThesaurusWordsTagRelated.getTagId(), ZzThesaurusWordsTagRelated::getTagId, zzThesaurusWordsTagRelated.getTagId());
        lambdaQueryWrapper.eq(null!=zzThesaurusWordsTagRelated.getGmtCreate(), ZzThesaurusWordsTagRelated::getGmtCreate, zzThesaurusWordsTagRelated.getGmtCreate());
        lambdaQueryWrapper.eq(null!=zzThesaurusWordsTagRelated.getGmtModify(), ZzThesaurusWordsTagRelated::getGmtModify, zzThesaurusWordsTagRelated.getGmtModify());
        lambdaQueryWrapper.eq(null!=zzThesaurusWordsTagRelated.getDeleted(), ZzThesaurusWordsTagRelated::getDeleted, zzThesaurusWordsTagRelated.getDeleted());

        lambdaQueryWrapper.orderByDesc(ZzThesaurusWordsTagRelated::getId);
        return lambdaQueryWrapper;
    }
}